Home } Forms } Extract Email Addresses



Visitors sometimes include their email address inside the message field when they fill out forms. To deal with this, this script parses through the string and uses a Regular Expression to find then return a comma-separated list of the valid email addresses it finds. Easy!

(For this demo, enter some text in the box and then click out of the field. If you included
one or more valid email addresses, they will be displayed in the Email field below the box.)


Email:

JavaScript Source Code 2002: Forms: Extract Email Addresses

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!